package com.itheima.controller;

import com.itheima.domain.db.Admin;
import com.itheima.service.db.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin")
public class AdminController{

    @Autowired
    private AdminService adminService;

    @GetMapping("/findByUsername")
    public Admin findByUsername(String username) {
        return adminService.findByUsername(username);
    }
}